﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace eLoan.Models
{
    public class ChequeReportModel
    {
        [Display(Name = "Select a branch")]
        public IEnumerable<SelectListItem> Branches { get; set; }

        public string SelectedBranchCode { get; set; }

        [Display(Name = "From")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        public DateTime FromDate { get; set; }

        [Display(Name = "To")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        public DateTime ToDate { get; set; }

        [Display(Name = "Loan status")]
        public int SelectedLoanStatus { get; set; }

        public IEnumerable<SelectListItem> LoanStatuses { get; set; }

        [Display(Name = "Search text")]
        public string SearchText { get; set; }

        public List<ChequeReportItem> ChequeReportItems { get; set; }

        [Display(Name = "Total Loan Amount")]
        public decimal TotalLoanAmount { get; set; }

        [Display(Name = "Total Receivable")]
        public decimal TotalReceivable { get; set; }

        [Display(Name = "Total Cheque Amount")]
        public decimal TotalChequeAmount { get; set; }

        [Display(Name = "Total Deduction")]
        public decimal TotalDeduction { get; set; }

    }

    public class ChequeReportItem
    {
        [Display(Name = "Document No")]
        public string DocumentNo { get; set; }

        [Display(Name = "Document Date")]
        public DateTime DocumentDate { get; set; }

        [Display(Name = "Borrower")]
        public string BorrowerName { get; set; }

        [Display(Name = "Agent")]
        public string AgentName { get; set; }

        [Display(Name = "Bank")]
        public string BankName { get; set; }

        [Display(Name = "Cheque No")]
        public string ChequeNo { get; set; }

        [Display(Name = "Cheque Amount")]
        public decimal ChequeAmount { get; set; }

        [Display(Name = "Total Deduction")]
        public decimal TotalDeduction { get; set; }

        [Display(Name = "Date Printed")]
        public DateTime DatePrinted { get; set; }

        [Display(Name = "Printed By")]
        public string PrintedBy { get; set; }

        [Display(Name = "Loan Amount")]
        public decimal LoanAmount { get; set; }

        [Display(Name = "Loan Interest")]
        public decimal LoanInterest { get; set; }

        [Display(Name = "Loan Interest Amount")]
        public decimal LoanInterestAmount { get; set; }

        [Display(Name = "Receivable")]
        public decimal Receivable { get; set; }

        [Display(Name = "Loan Status")]
        public string LoanStatus { get; set; }


    }

}